/*
 * Observable.h
 *
 *  Created on: 19.01.2013
 *      Author: phru
 */

#ifndef OBSERVABLE_H_
#define OBSERVABLE_H_

#include "Observer.h"
#include "inttypes.h"

#define MAX_OBSERVERS 10


typedef struct Observable_t{
	Observer_t* allObs[MAX_OBSERVERS];
	uint8_t obsValue;
	void (*update)(struct Observable_t* pObservable);
	void (*reg)(struct Observable_t* pObservable, Observer_t* pObs);
}Observable_t;

/**
 * Create observable
 */
Observable_t* createObservable();

#endif /* OBSERVABLE_H_ */
